import request from '@/utils/request'
import { getToken } from '@/utils/auth' // getToken from cookie

export function del(ids) {
  return request({
    url: '/api/upload/task/data',
    method: 'delete',
    data: ids
  })
}

export function downloadFile(id, type) {
  return request({
    url: `/api/download/${id}?token=${getToken()}&type=${type}`,
    method: 'get',
    responseType: 'blob'
  })
}

export default { del, downloadFile }
